﻿using AutoMapper;
using ServerSide.Model;
using ServerSide.Model.Dto.MenuDto;
using ServerSide.Model.Dto.UserDto;

namespace ServerSide.MiddlewareConfigs
{
    /// <summary>
    /// 实体类与dto之间映射（拷贝）
    /// </summary>
    public class AutoMapperConfigs:Profile
    {
        public AutoMapperConfigs()
        {
            //Menu
            //将menuadd拷贝到menu
            CreateMap<MenuAdd, Menu>();

            //User
            CreateMap<UserAdd, User>();
        }
    }
}
